#include<bits/stdc++.h>
using namespace std;
#define int long long
#define vvi vector<vector<int>>
const int mod =1e9+7;
#define ll long long
#define pii pair<ll,ll>
#define vi vector< ll >
#define vp vector<pii>
#define ld long double
#define S second
#define F first
#define ii pair<int, int>
#define IOS std::ios_base::sync_with_stdio(false)
#define pb push_back
#define pf push_front
#define inf INT_MAX
#define forf(i, a, b) for (int i = (a); i < (b); i++)
#define forr(i, a, b) for (int i = (a); i >=(b); i -= 1)
#define print(vec, l, r) \
for (int i = l; i <= r; i++) \
cout << vec[i] << " "; \
cout << endl;
#define all(x) x.begin(), x.end()
#define take(n) \
int n; \
cin>>n;
#define yn "YES":"NO"
#define input(vec, N) \
for (int i = 0; i < (N); i++) cin >> vec[i];
#define input1(vec, N) for (int i = 1; i <=(N); i++) cin >> vec[i];
const int N = (1e5+2);
const int M = (2e2+2);
const int MAXN = 1e6+12;
const ll INF = 2e18;
#define BLOCK 555
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<(n+1)*(n+1)+1<<endl;
}
}
242. Valid Anagram | 141. Linked List Cycle |
21. Merge Two Sorted Lists | 203. Remove Linked List Elements |
733. Flood Fill | 206. Reverse Linked List |
83. Remove Duplicates from Sorted List | 116. Populating Next Right Pointers in Each Node |
145. Binary Tree Postorder Traversal | 94. Binary Tree Inorder Traversal |
101. Symmetric Tree | 77. Combinations |
46. Permutations | 226. Invert Binary Tree |
112. Path Sum | 1556A - A Variety of Operations |
136. Single Number | 169. Majority Element |
119. Pascal's Triangle II | 409. Longest Palindrome |
1574A - Regular Bracket Sequences | 1574B - Combinatorics Homework |
1567A - Domino Disaster | 1593A - Elections |
1607A - Linear Keyboard | EQUALCOIN Equal Coins |
XOREQN Xor Equation | MAKEPAL Weird Palindrome Making |
HILLSEQ Hill Sequence | MAXBRIDGE Maximise the bridges |